package model;

public enum CombinationRank
{
	HIGH_CARD(0), ONE_PAIR(1), TWO_PAIR(2), THREE_OF_A_KIND(3), STRAIGHT(4),
	FLUSH(5), FULL_HOUSE(6), FOUR_OF_A_KIND(7), STRAIGHT_FLUSH(8);
	
	private final int index;
	
	private CombinationRank(int index)
	{
		this.index = index;
	}
	
	public int toInteger()
	{
		return index;
	}
	
	public String toString()
	{
		switch (this)
		{
			case HIGH_CARD:
				
				return "High card";
			
			case ONE_PAIR:
				
				return "One pair";
			
			case TWO_PAIR:
				
				return "Two pair";
			
			case THREE_OF_A_KIND:
				
				return "Three of a kind";
			
			case STRAIGHT:
				
				return "Straight";
			
			case FLUSH:
				
				return "Flush";
			
			case FULL_HOUSE:
				
				return "Full house";
			
			case FOUR_OF_A_KIND:
				
				return "Four of a kind";
			
			case STRAIGHT_FLUSH:
				
				return "Straight flush";
		}
		
		return null;
	}
}
